-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reply to Web API run with result #2108
Conversation
* send InProgress or Rejected * once REPLDone send Complete * closes #1426
* add script to work as a minimal REPL, that can be run from different window or machine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me! Very cool.
For the test procedure, should specify that one must run a "creative" game to obtain the expected output.
The servant "streaming" API is new to me. Perhaps add a comment to introduce readers to how it is being used here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
Co-authored-by: Restyled.io <commits@restyled.io>
@kostmo @byorgey I added a big note that tries to explain this streaming thing. I don't have any prior experience with streaming, so please take it with a grain of salt. It might even be overkill here, but I wanted to show that the program was parsed and the base is running it: I think this approach would really pay off when streaming logs. 🤔 |
code/run
passwebReply :: WebInvocationState -> IO ()
to TUI/code/run
#1426This uses the "IO wrapper" trick from #2098 - thus we can be sure that TUI will be the producer and Web API the consumer.
Example:
You can also test it with the shell script, that tries to act as a REPL and strips the JSON unless it gets an error: